<?php
// array for JSON response
$response = array();
// check for required fields
if (isset($_POST['id']) && isset($_POST['ruby'])) {
 
    $id = $_POST['id'];
	$ruby = $_POST['ruby'];
	
    // include db connect class
    require_once __DIR__ . '/db_connect.php';
 
    // connecting to db
    $db = new DB_CONNECT();
 
    // mysql inserting a new row
    $result = mysql_query("UPDATE user SET ruby='$ruby' WHERE id='$id'");
	print_r('1');
} else {
    print_r('0');
}
?>